<div>
    <div class="margin-top">
        <table class="footable table table-stripped toggle-arrow-tiny" style="margin-top:10px" data-page-size="10">
            <thead>
                <tr>
                    <th class="text-center">
                        <vc:i18n name="费用项" namespace="simplifyHisFee"></vc:i18n>
                    </th>
                    <th class="text-center">
                        <vc:i18n name="收费对象" namespace="simplifyHisFee"></vc:i18n>
                    </th>
                    <th class="text-center">
                        <vc:i18n name="收据编号" namespace="simplifyHisFee"></vc:i18n>
                    </th>
                    <th data-hide="phone" class="text-center">
                        <vc:i18n name="周期(单位:月)" namespace="simplifyHisFee"></vc:i18n>
                    </th>
                    <th data-hide="phone" class="text-center">
                        <vc:i18n name="应收/实收(单位:元)" namespace="simplifyHisFee"></vc:i18n>
                    </th>
                    <th data-hide="phone" class="text-center">
                        <vc:i18n name="缴费方式" namespace="simplifyHisFee"></vc:i18n>
                    </th>
                    <th data-hide="phone" class="text-center">
                        <vc:i18n name="缴费起始段" namespace="simplifyHisFee"></vc:i18n>
                    </th>
                    <th data-hide="phone" class="text-center">
                        <vc:i18n name="缴费时间" namespace="simplifyHisFee"></vc:i18n>
                    </th>
                    <th data-hide="phone" class="text-center">
                        <vc:i18n name="收银员" namespace="simplifyHisFee"></vc:i18n>
                    </th>
                    <th data-hide="phone" class="text-center">
                        <vc:i18n name="状态" namespace="simplifyHisFee"></vc:i18n>
                    </th>
                    <th data-hide="phone" class="text-center">
                        <vc:i18n name="备注" namespace="simplifyHisFee"></vc:i18n>
                    </th>
                    <th data-hide="phone" class="text-center">
                        <vc:i18n name="操作" namespace="simplifyHisFee"></vc:i18n>
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr v-for="feeDetail in simplifyHisFeeInfo.feeDetails">
                    <td class="text-center">
                        {{feeDetail.feeName}}
                    </td>
                    <td class="text-center">
                        {{feeDetail.payerObjName}}
                    </td>
                    <td class="text-center" v-if="feeDetail.receiptCode">
                        {{feeDetail.receiptCode}}
                    </td>
                    <td class="text-center" v-else>
                        <div v-if="feeDetail.state == '1400'">
                            <a href="javascript:void(0)" @click="_openGeneratorReceiptCode(feeDetail)">手工生成</a>
                        </div>
                        <div v-else>
                            -
                        </div>
                    </td>
                    <td class="text-center">
                        {{feeDetail.cycles}}
                    </td>
                    <td class="text-center" v-if="feeDetail.state=='1500'">
                        {{feeDetail.payerObjName}}费用中查看
                    </td>
                    <td class="text-center" v-else>
                        {{feeDetail.receivableAmount}}/{{feeDetail.receivedAmount}}<br>
                        <div v-for="(item,index) in feeDetail.feeAccountDetailDtoList" :key="index" v-bind:value="item.state" v-if="item.state != '1001'">
                            {{item.stateName}}: {{item.amount}}<br>
                        </div>
                        <div v-for="(item,index) in feeDetail.payFeeDetailDiscountDtoList" :key="index" v-bind:value="item.state">
                            {{item.discountName}}: {{Math.abs(item.discountPrice)}}<br>
                        </div>
                    </td>
                    <td class="text-center">
                        {{feeDetail.primeRateName}}
                    </td>

                    <td class="text-center">
                        {{vc.dateFormat(feeDetail.startTime)}}~</br>
                        <span v-if="feeDetail.startTime >= feeDetail.endTime">
                            {{vc.dateFormat(feeDetail.endTime)}}
                        </span>
                        <span v-else>
                            {{vc.dateSubOneDay(vc.dateFormat(feeDetail.endTime),vc.dateFormat(feeDetail.endTime),feeDetail.feeFlag)}}
                        </span>
                    </td>
                    <td class="text-center">
                        {{feeDetail.createTime}}
                    </td>
                    <td class="text-center">
                        {{feeDetail.cashierName || '-'}}
                    </td>
                    <td class="text-center">
                        {{feeDetail.stateName}}
                    </td>
                    <td class="text-center">
                        {{feeDetail.remark}}
                    </td>
                    <td class="text-center">
                        <div class="btn-group" v-if="feeDetail.state=='1400' || feeDetail.state== 1200 || feeDetail.state== ''">
                            <button class="btn-white btn btn-xs" v-on:click="_toRefundFee(feeDetail)">
                                <vc:i18n name="详情" namespace="simplifyHisFee"></vc:i18n>
                            </button>
                        </div>
                    </td>
                </tr>
            </tbody>
            <tr>
                <td colspan="12">
                    <ul class="pagination float-right"></ul>
                </td>
            </tr>
        </table>
        <vc:create namespace="simplifyHisFee" path="frame/paginationPlus"></vc:create>
    </div>
    <div id="generatorReceiptModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-body">
                    <h3 class="m-t-none m-b ">
                        <vc:i18n name="生成收据" namespace="simplifyHisFee"></vc:i18n>
                    </h3>
                    <div class="ibox-content">
                        <div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">
                                    <vc:i18n name="收据编号" namespace="simplifyHisFee"></vc:i18n>
                                </label>
                                <div class="col-sm-4">
                                    <select class="custom-select" v-model="simplifyHisFeeInfo.receiptType">
                                        <option selected disabled value="">
                                            {{vc.i18n('必填，请选择收据编号生成方式','simplifyHisFee')}}
                                        </option>
                                        <option value="Y">{{vc.i18n('系统生成','simplifyHisFee')}}</option>
                                        <option value="N">{{vc.i18n('自定义','simplifyHisFee')}}</option>
                                    </select>
                                </div>
                                <div class="col-sm-4" v-if="simplifyHisFeeInfo.receiptType == 'N'">
                                    <input v-model="simplifyHisFeeInfo.receiptCode" type="text" :placeholder="vc.i18n('必填，请填写收据编号','simplifyHisFee')" class="form-control">
                                </div>
                            </div>
                            <div class="ibox-content">
                                <button class="btn btn-primary float-right" type="button" v-on:click="_generatorReceiptCode()">
                                    <i class="fa fa-check"></i>&nbsp;生成
                                </button>
                                <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">
                                    <i class="fa fa-times"></i>&nbsp;取消
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>